package com.yanqu.road.server.timer.union;

import com.yanqu.road.server.manager.union.huaben.CrossUnionHuaBenConfigMgr;
import com.yanqu.road.server.manager.union.huaben.CrossUnionHuaBenMgr;
import com.yanqu.road.server.manager.union.huaben.CrossUnionHuaBenRankMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class CrossUnionHuaBenWeekTask extends GeneralTask {

    private static Logger logger = LogManager.getLogger(CrossUnionHuaBenWeekTask.class.getName());

    @Override
    public void doRun() {

        try {
            CrossUnionHuaBenConfigMgr.generateWeekTemp();
        }catch (Exception e){
            logger.error(e.getMessage(), e);
        }

        try {
            CrossUnionHuaBenRankMgr.lockPreWeekServerGroup();
        }catch (Exception e){
            logger.error(e.getMessage(), e);
        }

        try{
            CrossUnionHuaBenMgr.autoWeekHuaBenSettle();
        }catch (Exception e){
            logger.error(e.getMessage(), e);
        }
    }
}
